# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=belr
pkgver=5.3.83
pkgrel=0
pkgdesc="ABNF Parser"
url="https://www.linphone.org/"
arch="all"
license="GPL-3.0-or-later"
options="!check" # not test available
makedepends="cmake bctoolbox-dev eudev-dev samurai"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.bz2::https://gitlab.linphone.org/BC/public/belr/-/archive/$pkgver/belr-$pkgver.tar.bz2"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake \
		-DENABLE_STRICT=NO \
		-DBUILD_SHARED_LIBS=YES \
		-DENABLE_UNIT_TESTS=NO \
		-DENABLE_STRICT=NO

	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4093504aba9ef92750f394856b2eef5af8b221ffd31e965a3bfdbdca1dbd0291e1e45a1aa2828f47a6ae93069ef80e5a99d8ee61b965d80d6bbb833eb7dc7f0b  belr-5.3.83.tar.bz2
"
